//
//  BandConfigTargeType.swift
//  DaRings
//
//  Created by 尹琼 on 2023/2/27.
//

import UIKit
import Moya

public enum BandConfigTargeType {
    
    case config(version: Int)

}

extension BandConfigTargeType: APITargetType {
    
    public var baseURL: URL {
        
        return URL(string: "https://phact.moyoung.com")!
    }
    
    public var path: String {
        return "/init-settings"
    }
    
    public var method: Moya.Method {
        
        return .get
        
    }
    
   public var parameters: [String: Any] {
        
        switch self {
            
        case .config(let version):
            return ["v": version]
        }
        
    }
    
    
    
   public var task: Task {
        
        return .requestParameters(parameters: self.parameters, encoding: URLEncoding.default)
        
    }
    
    
    
}
